package org.qydjk.common.pojo.product;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * 产品标签明细
 * Created by Edward_yang on 2017/12/11 0011.
 */
@Entity
@Table(name = "qy_product_label_detail", catalog = "qydjk")
public class ProductLabelDetail {
    private Integer id;
    private String sellerProductLabelCode;
    private String sellerProductLabelDetailCode;
    private Integer productId;
    private Date createTime;
    private Date updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }



    @Basic
    @Column(name = "seller_product_label_code")
    public String getSellerProductLabelCode() {
        return sellerProductLabelCode;
    }

    public void setSellerProductLabelCode(String sellerProductLabelCode) {
        this.sellerProductLabelCode = sellerProductLabelCode;
    }


    @Basic
    @Column(name = "seller_product_label_detail_code")
    public String getSellerProductLabelDetailCode() {
        return sellerProductLabelDetailCode;
    }

    public void setSellerProductLabelDetailCode(String sellerProductLabelDetailCode) {
        this.sellerProductLabelDetailCode = sellerProductLabelDetailCode;
    }


    @Basic
    @Column(name = "product_id")
    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ProductLabelDetail that = (ProductLabelDetail) o;

        if (id != that.id) return false;
        if (sellerProductLabelCode != null ? !sellerProductLabelCode.equals(that.sellerProductLabelCode) : that.sellerProductLabelCode != null)
            return false;
        if (sellerProductLabelDetailCode != null ? !sellerProductLabelDetailCode.equals(that.sellerProductLabelDetailCode) : that.sellerProductLabelDetailCode != null)
            return false;
        if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (sellerProductLabelCode != null ? sellerProductLabelCode.hashCode() : 0);
        result = 31 * result + (sellerProductLabelDetailCode != null ? sellerProductLabelDetailCode.hashCode() : 0);
        result = 31 * result + (productId != null ? productId.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
